/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.hitechbangla.fctu.form;

import fctu.simulator.HTB_MAIN;

/**
 *
 * @author ASUS
 */
public class SIFInformation extends javax.swing.JFrame {

    /**
     * Creates new form SIFInformation
     */
    public SIFInformation(HTB_MAIN htb_main) {
        this.setTitle("SIF Information");
        initComponents();
        
       /* if(htb_main.radarACInfoSelection.isMode1())
	{
            CheckBox_Mode1.setSelected(true);
	   // jCheckBoxCallSign.setSelected(true);
	}
	
	if(htb_main.radarACInfoSelection.isMode2())
	{
            CheckBox_Mode2.setSelected(true);
	   // jCheckBoxSpeed.setSelected(true);
	}
        if(htb_main.radarACInfoSelection.isMode3A())
	{
            CheckBox_Mode3A.setSelected(true);
	   // jCheckBoxSpeed.setSelected(true);
	}
	if(htb_main.radarACInfoSelection.isModeC())
	{
            CheckBox_ModeC.setSelected(true);
	   // jCheckBoxSpeed.setSelected(true);
	}*/
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        CheckBox_Mode1 = new javax.swing.JCheckBox();
        CheckBox_Mode2 = new javax.swing.JCheckBox();
        CheckBox_Mode3A = new javax.swing.JCheckBox();
        CheckBox_ModeC = new javax.swing.JCheckBox();
        Button_OK = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        CheckBox_Mode1.setText("Mode1");

        CheckBox_Mode2.setText("Mode2");

        CheckBox_Mode3A.setText("Mode3A");

        CheckBox_ModeC.setText("ModeC");

        Button_OK.setText("OK");
        Button_OK.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Button_OKActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(75, 75, 75)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(CheckBox_Mode2)
                        .addComponent(CheckBox_Mode3A)
                        .addComponent(CheckBox_ModeC)
                        .addComponent(CheckBox_Mode1))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(Button_OK)
                        .addGap(8, 8, 8)))
                .addContainerGap(102, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(75, 75, 75)
                .addComponent(CheckBox_Mode1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 22, Short.MAX_VALUE)
                .addComponent(CheckBox_Mode2)
                .addGap(18, 18, 18)
                .addComponent(CheckBox_Mode3A)
                .addGap(26, 26, 26)
                .addComponent(CheckBox_ModeC)
                .addGap(18, 18, 18)
                .addComponent(Button_OK)
                .addGap(23, 23, 23))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void Button_OKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Button_OKActionPerformed
       
        if(CheckBox_Mode1.isSelected())
	{
	    HTB_MAIN.iFFOptionSelection.setMode1(true);
	}
	else
	{
	    HTB_MAIN.iFFOptionSelection.setMode1(false);
	}
        if(CheckBox_Mode2.isSelected())
	{
	    HTB_MAIN.iFFOptionSelection.setMode2(true);
	}
	else
	{
	    HTB_MAIN.iFFOptionSelection.setMode2(false);
	}
	
        if(CheckBox_Mode3A.isSelected())
	{
	    HTB_MAIN.iFFOptionSelection.setMode3A(true);
	}
	else
	{
	    HTB_MAIN.iFFOptionSelection.setMode3A(false);
	}
        if(CheckBox_ModeC.isSelected())
	{
	    HTB_MAIN.radarACInfoSelection.setHeight(true);
	    
	}
	else
	{
	    HTB_MAIN.radarACInfoSelection.setHeight(false);
	}
    }//GEN-LAST:event_Button_OKActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(SIFInformation.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(SIFInformation.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(SIFInformation.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(SIFInformation.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new SIFInformation(null).setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton Button_OK;
    private javax.swing.JCheckBox CheckBox_Mode1;
    private javax.swing.JCheckBox CheckBox_Mode2;
    private javax.swing.JCheckBox CheckBox_Mode3A;
    private javax.swing.JCheckBox CheckBox_ModeC;
    // End of variables declaration//GEN-END:variables
}
